<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>核销付款指令列表</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
				<div class="fieldBox">
				<div class="label" >付款指令ID</div>
			    <div class="field">
					 <input name="dkid" id="dkid" type="text" class="ui-textbox" value="">
				 </div>
				</div>
				
	            <div class="fieldBox">
	                <div class="label" >垫款规则名称</div>
	                <div class="field">
	                    <input name="ruleNm" id="ruleNm" type="text" class="ui-textbox" value="">
	                </div>
	            </div>
	            
	              <div class="fieldBox">
	                <div class="label" >付款账号</div>
	                <div class="field">
	                    <input name="payAccNm" id="payAccNm" type="text" class="ui-textbox" value="">
	                </div>
	            </div>
	            
	              <div class="fieldBox">
	                <div class="label" >收款账号</div>
	                <div class="field">
	                    <input name="dueAccNo" id="dueAccNo" type="text" class="ui-textbox" value="">
	                </div>
	            </div>
	            
		      <div class="fieldBox">
		              <div class="label">付款金额</div>
		              <div class="field">
		                  <input ligerui="width: 82" name="assAmtStart" id="assAmtStart" type="text"
		                       class="ui-textbox"  value="" validate="{required:true}"  >
		             -
		             <input ligerui="width: 82" name="assAmtEnd" id="assAmtEnd" type="text"
		                     class="ui-textbox" value="" validate="{required:true}"  >
		         </div>
		     </div>
		     
           <div class="fieldBox">
                <div class="label" >状态</div>
                <div class="field">
                    <select name="isDel" id="isDel">
                      <option value=" " checked>请选择</option>
                            <c:forEach items="${kvList}" var="kv">
                                <option value="${kv.key}">${kv.value}</option>
                            </c:forEach>
                    </select>
                </div>
            </div>
            
             <!--   <div class="fieldBox">
	                <div class="label" >再融资项目名称</div>
	                <div class="field">
	                    <input name="prjNM" id="prjNM" type="text" class="ui-textbox" value="">
	                </div>
	            </div> -->

                <div class="clearFix"></div>
                <div class="btnsBox">
                    <span id="searchBtn" class="sq-button sq-button-round">查询</span>
                    <span id="clearBtn" class="sq-button sq-button-round">清空</span>
                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
                
                
            </div>
        </form>
    </div>
    <!--  -->
    <div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
    var grid = null,callback=null;
    $(function () {
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/capital/capAdvBackFundLog/payMentList.do',
            method: 'get',
            columns: [
        {display: 'ID', name: 'id', minWidth: 120, align: 'left', enabledSort: false},              
        {display: '批次ID', name: 'batchId', minWidth: 100, align: 'left', enabledSort: false},
		{display: '垫款规则名称', name: 'ruleNm', minWidth: 100, align: 'left', enabledSort: false},
		{display: '状态', name: 'fundStsNm', minWidth: 100, align: 'left', enabledSort: false },
		{display: '流水号', name: 'batchNo', minWidth: 100, align: 'left', enabledSort: false},
		{display: '付款账号', name: 'payAccNm', minWidth: 100, align: 'left', enabledSort: false},
		{display: '收款账号', name: 'dueAccNo', minWidth: 160, align: 'left', enabledSort: false},
		{display: '付款金额', name: 'capUseCost', minWidth: 100, align: 'left', enabledSort: false,
			render: function (rowdata, index, value) {
                return '&yen;' + FormatMoney(rowdata.capUseCost / 100);
            }			
		},
		{display: '实际付款时间', name: 'advRetTime', minWidth: 190, align: 'left', enabledSort: false,render: renderDate},
		{display: '实际付款账号', name: 'payAccNm', minWidth: 120, align: 'left', enabledSort: false},
		],	
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: true,
            rownumbers: true,
            allowUnSelectRow: true,
            alternatingRow: false
        });
        grid.setHeight(100);

        $("#searchBar").ligerForm();

        $("#pageloading").hide();

        /* 查询 */
        $("#searchBtn").click(function (event) {
            var form = liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            }
            grid.reload();
        });

        /* 清空 */
        $("#clearBtn").click(function (event) {
            clearLigerForm("searchBar");
        });
        
        callback = function () {
            grid.reload();
        };
    }); 
    
    
    //租赁人还款记录、租赁项目资金回款记录
	function toDetailed(paySchId,paySchNo){
		if(StringUtils.isEmpty(paySchId)||StringUtils.isEmpty(paySchNo))return;
		   var params = "paySchId=" + paySchId+"&paySchNo="+paySchNo;
		Add_navTab('capAdvBackFundLog_'+paySchId,'资金回款详情','<%=path%>/capital/capAdvBackFundLog/toCapAvdBackLogModifyPage.do?'+params);
    }
    
	//格式化时间
	function renderDate(rowdata, index, value){
		var dateStr = "";
		if(null != value){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr;
	}

	
</script>

</body>
</html>
